package com.wuyan.locationdog.help

import com.arcsoft.commonbase.bean.MyInfoBean
import com.blankj.utilcode.util.ActivityUtils
import com.blankj.utilcode.util.SPUtils
import com.wuyan.locationdog.ui.login.LoginActivity

object LoginHelp {
    var deviceToken:String = ""
    var isDeviceLogin: Boolean = SPUtils.getInstance().getBoolean("isDeviceLogin", false)

    //单设备判断是否绑定档案
    var oneDeviceLoginToken:String = ""
    //单设备是否第一次登录
    var isFromLogin: Boolean = false

    lateinit var myInfoBean: MyInfoBean

    var imei: String = SPUtils.getInstance().getString("imei", "")


    fun logout() {
        SPUtils.getInstance().remove("token")
        SPUtils.getInstance().remove("isDeviceLogin")
        SPUtils.getInstance().remove("imei")
        SPUtils.getInstance().remove("deviceBindDogSuccess")

        ActivityUtils.finishAllActivities()
        ActivityUtils.startActivity(LoginActivity::class.java)
    }
}